package raceReservationServer;

import java.io.Serializable;

/**
 * The aim of this class is to implement the DTO Pattern So, object from this
 * class will be transferred using RMI, from the server to the client
 * 
 * ATTENTION - ATTENTION - ATTENTION - ATTENTION
 * 
 * SOME DETAILS OF THE CLASS ARE PROVIDED BUT ONE ESSENTIAL DETAIL IS MISSING
 * TIP: PARAMETER PASSING IN RMI.
 */

public class RaceRMIDTO implements Serializable{

	private String raceServer;
	private String name;
	private float distance;
	private String date;
	private int availablePlaces;

	public RaceRMIDTO(String h, String n, float dist, String d, int s) {
		raceServer = h;
		name = n;
		distance = dist;
		date = d;
		availablePlaces = s;
	}

	public String getRaceServer() {
		return raceServer;
	}

	public String getName() {
		return name;
	}
	
	public float getDistance() {
		return distance;
	}

	public String getDate() {
		return date;
	}

	public int getAvailablePlaces() {
		return availablePlaces;
	}

	public void setAvailablePlaces(int s) {
		availablePlaces = s;
	}

	public void decAvailablePlaces(int dec) {
		availablePlaces -= dec;
	}
}
